package com.nuoniu.sibanyun.entity.crm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 联系记录
 * </p>
 *
 * @author baiqiang
 * @since 2020-06-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("crm_touch")
@ApiModel(value="CrmTouch对象", description="联系记录")
public class CrmTouch extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公司ID")
    @TableField("company_id")
    private Integer companyId;

    @ApiModelProperty(value = "客户ID")
    @TableField("crm_id")
    private Integer crmId;

    @ApiModelProperty(value = "客户名称")
    @TableField("crm_name")
    private String crmName;

    @ApiModelProperty(value = "联系人ID")
    @TableField("link_man_id")
    private Integer linkManId;

    @ApiModelProperty(value = "联系人姓名")
    @TableField("link_man_name")
    private String linkManName;

    @ApiModelProperty(value = "跟进类别")
    @TableField("touch_type")
    private String touchType;

    @ApiModelProperty(value = "phone")
    @TableField("touch_phone")
    private String touchPhone;

    @ApiModelProperty(value = "跟进方式1:会话沟通2:外勤签到")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "联系电话")
    @TableField("touch_mode")
    private String touchMode;

    @ApiModelProperty(value = "联系时间")
    @TableField("contact_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
    private LocalDate contactDate;

    @ApiModelProperty(value = "下次联系时间")
    @TableField("next_touch_date")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm" )
    private LocalDateTime nextTouchDate;

    @ApiModelProperty(value = "业务员Id")
    @TableField("sales_man_id")
    private Integer salesManId;

    @ApiModelProperty(value = "业务员姓名")
    @TableField("sales_man_name")
    private String salesManName;

    @ApiModelProperty(value = "下次联系目标")
    @TableField("next_touch_target")
    private String nextTouchTarget;

    @ApiModelProperty(value = "描述")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "签到地址")
    @TableField("visit_sign")
    private String visitSign;

    @ApiModelProperty(value = "拍照")
    @TableField("photograph")
    private String photograph;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "创建人姓名")
    @TableField("create_user_name")
    private String createUserName;

    @ApiModelProperty(value = "修改人id")
    @TableField("update_user_id")
    private Integer updateUserId;

    @ApiModelProperty(value = "修改人姓名")
    @TableField("update_user_name")
    private String updateUserName;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改时间")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @ApiModelProperty(value = "状态(0:正常 1:删除 2：停用)")
    @TableField("status")
    private Integer status;

//    @ApiModelProperty(value = "联系类别")
//    @TableField("crm_touch")
//    private String crmTouch;

    @ApiModelProperty(value = "自定义字段数据")
    @TableField("define_fields")
    private String defineFields;


}
